import request from '@/utils/request'

// 新增用户
export const userRegister = (data) => request.post('/user/register', data)

// 删除用户
export const deleteUser = (ids) =>
  request.delete('/user', {
    params: {
      ids
    }
  })

// 登录
export const userLogin = (data) => request.post('/user/login', data)

// 获取用户信息
export const getUserInfoApi = () => request.get('/user/info')

export const getUserList = (params) =>
  request.get('/user/page', {
    params
  })

export const saveOrUpdateUser = (data) => request.post('/user', data)
